package java.DealProblem.src;

public class Main {
    public static void main1(String[] args) {
        StringBuffer stringBuffer = new StringBuffer("123");
        stringBuffer.append("abc").append("excellent");
        System.out.println(stringBuffer);

        StringBuilder stringBuilder = new StringBuilder("Hi");
        stringBuilder.append(" Hello");
        stringBuilder.append(" Aileen ").append("How are you?");
        System.out.println(stringBuilder);

        System.out.println("=================================");
//        将stringBuilder转化成：string
        String str = stringBuilder.toString();
        System.out.println(str);

        System.out.println("----------------------------------");

//        将string转换成stringBuilder - 调用构造方法
        String str1 = "aileen";
        StringBuilder stringBuilder1 = new StringBuilder(str1);
        System.out.println(stringBuilder1);

        System.out.println("----------------------------------");
//
        StringBuilder stringBuilder2 = new StringBuilder();
        stringBuilder2.append(str1);
        System.out.println(stringBuilder2);
    }
}